#ifndef __DAO_SDL_H__
#define __DAO_SDL_H__
#include<stdlib.h>
#include<assert.h>
#include<string.h>
#include<dao.h>
#include<SDL/SDL_stdinc.h>
#include<SDL/SDL_types.h>
#include<SDL/SDL.h>
#include<SDL/SDL_active.h>
#include<SDL/SDL_cdrom.h>
#include<SDL/SDL_cpuinfo.h>
#include<SDL/SDL_audio.h>
#include<SDL/SDL_getenv.h>
#include<SDL/SDL_joystick.h>
#include<SDL/SDL_loadso.h>
#include<SDL/SDL_mutex.h>
#include<SDL/SDL_thread.h>
#include<SDL/SDL_timer.h>
#include<SDL/SDL_error.h>
#include<SDL/SDL_video.h>
#include<SDL/SDL_keysym.h>
#include<SDL/SDL_keyboard.h>
#include<SDL/SDL_mouse.h>
#include<SDL/SDL_events.h>
#include<SDL/SDL_rwops.h>
#ifndef DAO_SDL_STATIC
#ifndef DAO_DLL_SDL
#define DAO_DLL_SDL DAO_DLL_EXPORT
#endif
#else
#define DAO_DLL_SDL
#endif

extern DaoVmSpace *__daoVmSpace;

#ifdef __cplusplus
extern "C"{
#endif

extern DaoTypeBase *dao_SDL_ActiveEvent_Typer;
extern DaoTypeBase *dao_SDL_AudioCVT_Typer;
extern DaoTypeBase *dao_SDL_AudioSpec_Typer;
extern DaoTypeBase *dao_SDL_BlitMap_Typer;
extern DaoTypeBase *dao_SDL_CD_Typer;
extern DaoTypeBase *dao_SDL_CDtrack_Typer;
extern DaoTypeBase *dao_SDL_Color_Typer;
extern DaoTypeBase *dao_SDL_Cursor_Typer;
extern DaoTypeBase *dao_SDL_Event_Typer;
extern DaoTypeBase *dao_SDL_ExposeEvent_Typer;
extern DaoTypeBase *dao_SDL_JoyAxisEvent_Typer;
extern DaoTypeBase *dao_SDL_JoyBallEvent_Typer;
extern DaoTypeBase *dao_SDL_JoyButtonEvent_Typer;
extern DaoTypeBase *dao_SDL_JoyHatEvent_Typer;
extern DaoTypeBase *dao_SDL_Joystick_Typer;
extern DaoTypeBase *dao_SDL_KeyboardEvent_Typer;
extern DaoTypeBase *dao_SDL_MouseButtonEvent_Typer;
extern DaoTypeBase *dao_SDL_MouseMotionEvent_Typer;
extern DaoTypeBase *dao_SDL_Overlay_Typer;
extern DaoTypeBase *dao_SDL_Palette_Typer;
extern DaoTypeBase *dao_SDL_PixelFormat_Typer;
extern DaoTypeBase *dao_SDL_QuitEvent_Typer;
extern DaoTypeBase *dao_SDL_RWops_Typer;
extern DaoTypeBase *dao_SDL_Rect_Typer;
extern DaoTypeBase *dao_SDL_ResizeEvent_Typer;
extern DaoTypeBase *dao_SDL_Surface_Typer;
extern DaoTypeBase *dao_SDL_SysWMEvent_Typer;
extern DaoTypeBase *dao_SDL_SysWMmsg_Typer;
extern DaoTypeBase *dao_SDL_Thread_Typer;
extern DaoTypeBase *dao_SDL_TimerID_Typer;
extern DaoTypeBase *dao_SDL_UserEvent_Typer;
extern DaoTypeBase *dao_SDL_VideoInfo_Typer;
extern DaoTypeBase *dao_SDL_cond_Typer;
extern DaoTypeBase *dao_SDL_iconv_t_Typer;
extern DaoTypeBase *dao_SDL_keysym_Typer;
extern DaoTypeBase *dao_SDL_mutex_Typer;
extern DaoTypeBase *dao_SDL_sem_Typer;
extern DaoTypeBase *dao_WMcursor_Typer;
extern DaoTypeBase *dao_private_hwdata_Typer;
extern DaoTypeBase *dao_private_yuvhwdata_Typer;
extern DaoTypeBase *dao_private_yuvhwfuncs_Typer;
extern DaoTypeBase *dao_va_list_Typer;
extern DaoTypeBase *dao_SDL_TimerID_Typer;
#ifdef __cplusplus
}
#endif


SDL_ActiveEvent* DAO_DLL_SDL Dao_SDL_ActiveEvent_New();

SDL_AudioCVT* DAO_DLL_SDL Dao_SDL_AudioCVT_New();

typedef struct Dao_SDL_AudioSpec Dao_SDL_AudioSpec;
struct DAO_DLL_SDL Dao_SDL_AudioSpec
{
	SDL_AudioSpec  nested;
	SDL_AudioSpec *object;
	DaoCData *cdata;
};
Dao_SDL_AudioSpec* DAO_DLL_SDL Dao_SDL_AudioSpec_New();
//Dao_SDL_AudioSpec* DAO_DLL_SDL Dao_SDL_AudioSpec_Wrap( SDL_AudioSpec *p );
//Dao_SDL_AudioSpec* DAO_DLL_SDL Dao_SDL_AudioSpec_Copy( const SDL_AudioSpec p );
static void Dao_SDL_AudioSpec_callback( void* self0, Uint8 stream[], int len );

SDL_CD* DAO_DLL_SDL Dao_SDL_CD_New();

SDL_CDtrack* DAO_DLL_SDL Dao_SDL_CDtrack_New();

SDL_Color* DAO_DLL_SDL Dao_SDL_Color_New();

SDL_Cursor* DAO_DLL_SDL Dao_SDL_Cursor_New();

SDL_Event* DAO_DLL_SDL Dao_SDL_Event_New();

SDL_ExposeEvent* DAO_DLL_SDL Dao_SDL_ExposeEvent_New();

SDL_JoyAxisEvent* DAO_DLL_SDL Dao_SDL_JoyAxisEvent_New();

SDL_JoyBallEvent* DAO_DLL_SDL Dao_SDL_JoyBallEvent_New();

SDL_JoyButtonEvent* DAO_DLL_SDL Dao_SDL_JoyButtonEvent_New();

SDL_JoyHatEvent* DAO_DLL_SDL Dao_SDL_JoyHatEvent_New();

SDL_KeyboardEvent* DAO_DLL_SDL Dao_SDL_KeyboardEvent_New();

SDL_MouseButtonEvent* DAO_DLL_SDL Dao_SDL_MouseButtonEvent_New();

SDL_MouseMotionEvent* DAO_DLL_SDL Dao_SDL_MouseMotionEvent_New();

SDL_Overlay* DAO_DLL_SDL Dao_SDL_Overlay_New();

SDL_Palette* DAO_DLL_SDL Dao_SDL_Palette_New();

SDL_PixelFormat* DAO_DLL_SDL Dao_SDL_PixelFormat_New();

SDL_QuitEvent* DAO_DLL_SDL Dao_SDL_QuitEvent_New();

typedef struct Dao_SDL_RWops Dao_SDL_RWops;
struct DAO_DLL_SDL Dao_SDL_RWops
{
	SDL_RWops  nested;
	SDL_RWops *object;
	DaoCData *cdata;
};
Dao_SDL_RWops* DAO_DLL_SDL Dao_SDL_RWops_New();
//Dao_SDL_RWops* DAO_DLL_SDL Dao_SDL_RWops_Wrap( SDL_RWops *p );
//Dao_SDL_RWops* DAO_DLL_SDL Dao_SDL_RWops_Copy( const SDL_RWops p );
static int Dao_SDL_RWops_close( SDL_RWops* self0 );
static int Dao_SDL_RWops_read( SDL_RWops* self0, void* ptr, int size, int maxnum );
static int Dao_SDL_RWops_seek( SDL_RWops* self0, int offset, int whence );
static int Dao_SDL_RWops_write( SDL_RWops* self0, const void* ptr, int size, int num );

SDL_Rect* DAO_DLL_SDL Dao_SDL_Rect_New();

SDL_ResizeEvent* DAO_DLL_SDL Dao_SDL_ResizeEvent_New();

SDL_Surface* DAO_DLL_SDL Dao_SDL_Surface_New();

SDL_SysWMEvent* DAO_DLL_SDL Dao_SDL_SysWMEvent_New();

SDL_UserEvent* DAO_DLL_SDL Dao_SDL_UserEvent_New();

SDL_VideoInfo* DAO_DLL_SDL Dao_SDL_VideoInfo_New();

SDL_keysym* DAO_DLL_SDL Dao_SDL_keysym_New();
#endif
